
package org.openeai.lite.esb.components;

import org.apache.log4j.Logger;
import org.openeai.lite.common.util.DateTimeUtils;


public class MessageEnricherComponent
{

    private Logger log = Logger.getLogger(this.getClass());

    private String message = new String();

    // note that 'default' signature public void accept(String payload){}
    // is not used. Reflection black magic will take care of everything...
    public String enrichMessage(String payload)
    {
        log.info("Received payload: " + payload);

        message = DateTimeUtils.now().concat(" - ").concat(payload);
        log.info("Returning message: " + message);
        return message;
    }

}
